<!DOCTYPE html>
<html>
<head>
    <title>工装报废</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("toolsscrap:check"))
                <i-button type="primary" @click="check"><i class="fa fa-gavel"></i>&nbsp;审批</i-button>
                #end
                #if($shiro.hasPermission("toolsscrap:peCheck"))
                <i-button type="primary" @click="peCheck"><i class="fa fa-gavel"></i>&nbsp;审批</i-button>
                #end
                #if($shiro.hasPermission("toolsscrap:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("toolsscrap:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("toolsscrap:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>


    <div id="reviewLayer1" style="display: none;">
        <form class="form-horizontal" style="width: 400px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-3 control-label" style="width: 28%;">审核状态</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <Radio-group v-model="checkResult">
                            <Radio :label="1" checked><span>通过</span></Radio>
                            <Radio :label="2" ><span>不通过</span></Radio>
                        </Radio-group>
                    </div>
                    <div class="col-sm-3 control-label" style="width: 28%;">判定与建议</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <i-input v-model="toolsScrap.advice" placeholder="判定与建议" type="textarea"></i-input>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <div id="reviewLayer2" style="display: none;">
        <form class="form-horizontal" style="width: 300px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label" style="width: 30%;">审核状态</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <Radio-group v-model="checkResult2">
                            <Radio :label="1" checked><span>通过</span></Radio>
                            <Radio :label="2" ><span>不通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="toolsScrap" :rules="ruleValidate" :label-width="100">
            <Row>
                <!--<i-col span="11">
                    <Form-item label="唯一编号" prop="onlyCode">
                        <i-input v-model="toolsScrap.onlyCode" placeholder="唯一编号"></i-input>
                    </Form-item>
                </i-col>-->
                <i-col span="11">
                    <Form-item label="处置日期" prop="dealDate">
                        <Date-picker v-model="toolsScrap.dealDate" placeholder="处置日期"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="名称" prop="name">
                        <i-input v-model="toolsScrap.name" placeholder="名称" readonly @click.native="getToolsInfo" icon="md-arrow-dropdown-circle"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="型号规格" prop="spec">
                        <i-input v-model="toolsScrap.spec" placeholder="型号规格" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="唯一标识" prop="onlyMark">
                        <i-input v-model="toolsScrap.onlyMark" placeholder="唯一标识" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="图号" prop="mapNo">
                        <i-input v-model="toolsScrap.mapNo" placeholder="图号" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="使用工序号" prop="workProCode">
                        <i-input v-model="toolsScrap.workProCode" placeholder="使用工序号" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="报废数量" prop="scrapNum">
                        <i-input v-model="toolsScrap.scrapNum" placeholder="报废数量"></i-input>
                    </Form-item>
                </i-col>
            </Row>
<!--                <i-col span="11">-->
<!--                    <Form-item label="版本" prop="toolsVersion">-->
<!--                        <i-input v-model="toolsScrap.toolsVersion" placeholder="版本"></i-input>-->
<!--                    </Form-item>-->
<!--                </i-col>-->
<!--                <i-col span="11">-->
<!--                    <Form-item label="工装类别" prop="toolsType">-->
<!--                        <i-select v-model="toolsScrap.toolsType" filterable @on-change="getToolsType">-->
<!--                            <i-option v-for="type in toolsTypeList" :value="type.typeCode" :key="type.typeCode">{{type.typeCode}} {{type.typeName}}-->
<!--                            </i-option>-->
<!--                        </i-select>-->
<!--                    </Form-item>-->
<!--                </i-col>-->
            <!--</Row>
            <Row>
                <i-col span="11">
                    <Form-item label="所属车间名称" prop="farmName">
                        <i-input v-model="toolsScrap.farmName" placeholder="所属车间名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="生产线代码" prop="prodCode">
                        <i-input v-model="toolsScrap.prodCode" placeholder="生产线代码"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="生产线名称" prop="prodName">
                        <i-input v-model="toolsScrap.prodName" placeholder="生产线名称"></i-input>
                    </Form-item>
                </i-col>-->
            <Row>
                <i-col span="11">
                    <Form-item label="现象描述" prop="descrCon">
                        <i-input v-model="toolsScrap.descrCon" type="textarea" placeholder="现象描述"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="备注" prop="remark">
                        <i-input v-model="toolsScrap.remark" type="textarea" placeholder="备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>

            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/tools/toolsscrap.js?_${date.systemTime}"></script>
</body>
</html>
